//
//  Image.h
//  Void Dead
//
//  Created by Sidney Just on 06.07.09.
//  Copyright 2009 by Sidney Just
//  This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; 
//  either version 3 of the License, or (at your option) any later version.
//  
//  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 
//  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//  

#import <Foundation/Foundation.h>
@class VD_Color;

/** 
 * This class allows you to load a image and get the ARGB value for every pixel
 **/
@interface VD_Image : NSObject {
	unsigned int width;
	unsigned int height;
	
	@private
	unsigned char* data;
}

/** 
 * width of the loaded image
 **/
@property unsigned int width;

/** 
 * height of the loaded image
 **/
@property unsigned int height;

/** 
 * This loads the texture
 @param file The path to image (loaded from the main bundle)
 **/
- (void)lockBitmap:(NSString *)file;

/** 
 * This deletes the allocated memory used by the loaded image
 **/
- (void)closeBitmap;

/** 
 * This will read the ARGB Value for the pixel at the given position
 @param point Position of the pixel
 @return A VD_Color instance with the pixel data
 **/
- (VD_Color *)getBitmapColor:(CGPoint)point;

@end
